package cn.getech.data.development.service;

import cn.getech.data.development.entity.TableFieldInfo;
import cn.getech.data.development.entity.TableInfo;
import cn.getech.data.development.entity.UploadVersionLog;
import cn.getech.data.development.model.dto.*;
import cn.getech.data.development.model.qo.UploadVersionLogQO;
import cn.getech.data.development.model.vo.UploadVersionUpdateRoleVO;
import cn.getech.data.intelligence.common.utils.PageUtils;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 上传版本包记录 服务类
 * </p>
 *
 * @author hujz
 * @since 2020-07-03
 */
public interface UploadVersionLogService extends IService<UploadVersionLog> {

    PageUtils page(UploadVersionLogQO uploadVersionLogQO);

    UploadVersionLogDto getUploadLog(String zipPathName);

    UploadVersionLogDto uploadVersionZip(Integer procId, String zipPathName, MultipartFile multipartFile);

    void updateRole(UploadVersionUpdateRoleVO uploadVersionUpdateRoleVO);

    void cancelupload(String zipPathName);

    void finsh(String zipPathName);

    UploadVersionCheckResultLogDto fileCheck(String zipPathName);

    void reCheack(Long cheackLogId);

    UploadVersionConnectResultLogSumDto connectRests(String zipPathName);

    void confirmImportConnects(String zipPathName);

    void reImportConnect(Long connectLogId);

    UploadVersionTableResultLogSumDto tableRests(String zipPathName);

    void confirmImportTables(String zipPathName);

    void reImportTable(Long tableLogId);

    UploadVersionWorkFlowResultLogSumDto workflowRests(String zipPathName);

    void confirmImportWorkflows(String zipPathName);

    void reImportWorkflows(Long workflowLogId);

    List<String> rollbackProject(Long versionId);

    Boolean updateKuduTable(List<TableFieldInfo> tableFieldInfos, List<TableFieldInfo> olderTbaleFields, TableInfo tableInfo,
                            String dbName, String tableName, Boolean containtsId, Integer procId, Integer importChangeRole);





//    List<VersionStatusResultVO> cheackUploadVersionZipByVersionUUid(String versionUUid);
//
//    List<VersionStatusResultVO> importData(String versionUUid);

}
